using System;
using System.Collections;
using System.Collections.Generic;
using TMPro;
using UnityEngine;

public class HistoryItem : UIPanel
{
   private TextMeshProUGUI    timeText;
   private TextMeshProUGUI    scoreText;

   private void Awake()
   {
      timeText  = transform.Find("TimeText").GetComponent<TextMeshProUGUI>();
      scoreText = transform.Find("NumText").GetComponent<TextMeshProUGUI>();
   }
   
   void ScrollCellIndex(int idx)
   {
      string name = "Cell " + idx.ToString ();
      gameObject.name = name;
      var record = LocalConfig.intance.LoadUserData();
      timeText.text  = record[idx].time;
      scoreText.text = record[idx].score.ToString();
   }

}
